package y24.m1.homework;

import java.text.DecimalFormat;
import java.util.Random;

public class Test9 {
    public static void main(String[] args) {
        int numPoints = 50;
        double[] x = new double[numPoints];
        double[] y = new double[numPoints];

        Random random = new Random();

        for (int i = 0; i < numPoints; i++) {
            x[i] = random.nextDouble() * 10 + 1; // Generate random x coordinate between 1 and 11
            y[i] = 1 + 2 * Math.log(x[i]); // Calculate corresponding y coordinate using the equation
        }

        // Print the generated coordinates
        DecimalFormat df = new DecimalFormat("#.##");
        System.out.println("Generated Coordinates:");
        for (int i = 0; i < numPoints; i++) {
            System.out.println("Point " + (i+1) + ": (" + df.format(x[i]) + ", " + y[i] + ")");
        }
    }
}
